package part11;

import java.util.*;

/**
 * @author wcj
 * @Date 2021/5/20 16:42
 * @Version 1.0
 */
public class Part113 {

    public static void main(String[] args) {
        Collection<Integer> collection = new ArrayList<Integer>(Arrays.asList(1, 2, 3, 4, 5));
        Integer[] moreInts = {6,7,8,9,10};
        collection.addAll(Arrays.asList(moreInts));
        Collections.addAll(collection,11,12,13,14,15);
        Collections.addAll(collection,moreInts);
        // Arrays.asList()方法，底层时固定大小的数组，不能调整尺寸，因而使用add方法会出错
        List<Integer> list = Arrays.asList(16, 17, 18, 19, 20);
        list.set(1,99);
//        list.add(21);
    }
}
